package com.lantosec.hmrp.modules.warning.vo;

import com.lantosec.hmrp.modules.warning.entity.WarningNotifier;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 预警通知人 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-07-16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="WarningNotifier对象", description="预警通知人")
public class WarningNotifierVO extends BaseVO<WarningNotifier> {
    private static final long serialVersionUID = 1L;


    public WarningNotifierVO(WarningNotifier entity){
        this.warningNotifierId = entity.getWarningNotifierId();
        this.ruleId = entity.getRuleId();
        this.notifierMode = entity.getNotifierMode();
        this.notifierDeptId = entity.getNotifierDeptId();
        this.notifierPositionId = entity.getNotifierPositionId();
        this.notifierUserId = entity.getNotifierUserId();
        this.notifierRoleId = entity.getNotifierRoleId();
    }

    @Override
    public WarningNotifier convertToEntity(){
        return new WarningNotifier(this);
    }


    @ApiModelProperty(value = "主键ID")
    private Integer warningNotifierId;

    @ApiModelProperty(value = "预警规则ID")
    private String ruleId;

    @ApiModelProperty(value = "预警处置人模式(1部门 2岗位 3人员 4角色)")
    private Integer notifierMode;

    @ApiModelProperty(value = "预警处置人部门ID")
    private String notifierDeptId;

    @ApiModelProperty(value = "预警处置人岗位ID")
    private String notifierPositionId;

    @ApiModelProperty(value = "预警处置人ID")
    private String notifierUserId;

    @ApiModelProperty(value = "预警处置人角色ID")
    private String notifierRoleId;


}
